﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LY.Entity;
using LY.Entity.Entities;
using LY.Entity.PageSearch;
using LY.Entity.SearchEntity;


namespace LY.Interface
{
    /// <summary>
    /// 
    /// </summary>
    public interface IUserService
    {
        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <param name="userId">用户标识</param>
        /// <returns>用户信息</returns>
        IUser GetUserInfo(string userId);

        /// <summary>
        /// 获取用户列表
        /// </summary>
        /// <param name="userId">用户标识</param>
        /// <returns>用户信息</returns>
        List<S_User> GetUserList(int deptid);

        /// <summary>
        /// 获取用户的权限列表
        /// </summary>
        /// <param name="userId">用户标识</param>
        /// <returns>
        /// 权限列表
        /// </returns>
        List<IPrivilege> GetUserPrivilegeList(string userId);



        List<S_User_EX> QueryRoleUserList(int roleid);
        List<S_User_EX> QueryRoleUserList();

        /// <summary>
        /// 用户列表
        /// </summary>
        /// <param name="search"></param>
        /// <param name="view"></param>
        /// <returns></returns>
        PagedList<S_User> QueryUserList(UserSearch search, PageView view);

        //用户实体
        S_User GetUser(int? id);

        //保存用户
        int SaveUser(S_User user);

        //删除用户
        int DeleteUser(int? id);

        List<S_User> GetUpperUserList(int? id);

        //根据当前用户的ID查询出他的领导
        S_User SelectUpUser(int id);

        //修改密码
        int UpdatePwd(string pwd, int id);
    }
}
